<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@page import="javax.swing.SpringLayout.Constraints"%>
<%@page import="vn.edu.hungvuongaptech.common.Constant"%>
<%@page import="vn.edu.hungvuongaptech.dao.IntroDAO"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="vn.edu.hungvuongaptech.dao.NamHocDAO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="vn.edu.hungvuongaptech.model.NamHocModel"%>
<%@page import="vn.edu.hungvuongaptech.dao.ThanhVienDAO"%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="<%= session.getMaxInactiveInterval() %>;url=Logout.jsp">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/general.css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/aqua.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/General.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/zapatec.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/calendar.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/calendar-en.js"></script>
<script src="<%=request.getContextPath()%>/js/jquery.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/js/interface.js" type="text/javascript"></script>

<!--[if lt IE 7]>
 <style type="text/css">
 div, img { behavior: url("<%=request.getContextPath()%>/css/iepngfix.htc") }
 </style>
<![endif]-->

<title>Thông Tin Sinh Viên</title>

	

</head>
<body>
<div align="center">
	<!-- S HEAD CONTENT -->
			<jsp:include page="../block/header_QuanLySinhVien.jsp" />
	<!-- E HEAD CONTENT -->
	
	<c:set var="kiemtra" value='<%=ThanhVienDAO.kiemTraMaThanhVien(session.getAttribute("maThanhVien").toString()) %>'></c:set>
	<c:set var="ChiTietThanhVien" value='<%=ThanhVienDAO.XemChiTietThanhVienByMaThanhVien(request.getParameter("maThanhVien")) %>'></c:set>
	<table width="790px">
			<tr style="background-color: transparent;"><td style="text-align: center;font-size: 16px;font-weight: bold;font-style: italic;"><br/>Bạn Đang Xem Thông Tin Chi Tiết Của ${ChiTietThanhVien.hoThanhVien} ${ChiTietThanhVien.tenLot} ${ChiTietThanhVien.tenThanhVien}<br/></td></tr>
		</table>
		<c:if test="${not empty thongbao}">
			<p style="color:red; background-color: yellow; width: 200px;"><b><c:out value="${thongbao}"></c:out></b></p>
		</c:if>
	<c:if test="${kiemtra eq  false}">
		<form action="<%=request.getContextPath()%>/SinhVienController?maThanhVien=${ChiTietThanhVien.maThanhVien}" method="post">
		<input name="hidden" type="hidden" id="hidden" value="capnhat" />
		<table width="790px" border="1">
			<tr style="background-color: #696565;font-size: 16px;font-weight: bold;font-style: italic;">
				<td colspan="2" style="text-align: left;padding-left: 20px;">Chi Tiết</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Họ</td>
				<td style="text-align: left;padding-left: 10px;"><input name="ho" type="text" value="${ChiTietThanhVien.hoThanhVien}" /> </td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Tên lót</td>
				<td style="text-align: left;padding-left: 10px;">
				<input name="tenlot" type="text" value="${ChiTietThanhVien.tenLot }" /></td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Tên</td>
				<td style="text-align: left;padding-left: 10px;">
				<input type="text" name="ten" value="${ChiTietThanhVien.tenThanhVien }" /></td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Số nhà</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.soNha}"><input name="sonha" type="text" value="Chưa có" /></c:when>
						<c:otherwise>
							<input type="text" name="sonha" value="${ChiTietThanhVien.soNha}" />
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Đường</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.duong}"><input name="duong" type="text" value="Chưa có" /></c:when>
						<c:otherwise>
							<input type="text" name="duong" value="${ChiTietThanhVien.duong}" />
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Phường xã</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.phuongXa}"><input name="phuongxa" type="text" value="Chưa có" /></c:when>
						<c:otherwise>
							<input type="text" name="phuongxa" value="${ChiTietThanhVien.phuongXa}" />
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Quận huyện</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.quanHuyen}"><input name="quanhuyen" type="text" value="Chưa có" /></c:when>
						<c:otherwise>
							<input name="quanhuyen" type="text" value="${ChiTietThanhVien.quanHuyen}" />
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Thành phố</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.thanhPho}"><input name="thanhpho" type="text" value="Chưa có" /></c:when>
						<c:otherwise>
							<input name="thanhpho" type="text" value="${ChiTietThanhVien.thanhPho}" />
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Ngày Sinh</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.ngaySinh}"><input name="ngaysinh" id="ngaysinh" readonly="readonly" type="text" value="Chưa có"/></c:when>
						<c:otherwise>
							<input name="ngaysinh" id="ngaysinh" type="text" value="${ChiTietThanhVien.ngaySinh}"/>
						</c:otherwise>
					</c:choose>
				<img id="imgFromDate_1" src="<%=request.getContextPath()%>/images/icon_lich/3.png" alt="Calendar" height="20px" style="margin-bottom: -5px;"/>
				</td>
			</tr>
			
			<script type="text/javascript">
			  <%
			  	for(int i=1; i<= 1 ; i++) {
			  		String output = "";
			  		output += "Zapatec.Calendar.setup({";
			  		output += "firstDay          : 1,";
			  		output += "weekNumbers       : false,";
			  		output += "range             : [2000.01, 2030.12],";
			  		output += "electric          : false,";
			  		output += "inputField        : 'ngaysinh',";
			  		output += "button            : 'imgFromDate_1',";
			  		output += "ifFormat          : '%m-%d-%Y'";
			  		output += "});";  		
			  		out.println(output); 
			  	}
			  %>
		</script>
			
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Email</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.email}"><input name="email" type="text" value="Chưa có"/></c:when>
						<c:otherwise>
							<input name="email" type="text" value="${ChiTietThanhVien.email}"/>
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">CMND</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.chungMinhNhanDan}"><input name="cmnd" type="text" value="Chưa có"/></c:when>
						<c:otherwise>
							<input name="cmnd" type="text" value="${ChiTietThanhVien.chungMinhNhanDan}"/>
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Vai Trò</td>
				<td style="text-align: left;padding-left: 10px;">${ChiTietThanhVien.tenVaiTro}</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Bộ Phận</td>
				<td style="text-align: left;padding-left: 10px;">${ChiTietThanhVien.tenKhoa}</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;"><input name="capnhat" type="submit" value="Cập nhật" /></td>
				<td style="text-align: left;padding-left: 10px;"></td>
			</tr>
		</table>
		</form>
	</c:if>
	
	<c:if test="${kiemtra eq true}">
		<table width="790px" border="1">
			<tr style="background-color: #696565;font-size: 16px;font-weight: bold;font-style: italic;">
				<td colspan="2" style="text-align: left;padding-left: 20px;">Chi Tiết</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Họ và Tên</td>
				<td style="text-align: left;padding-left: 10px;">${ChiTietThanhVien.hoThanhVien} ${ChiTietThanhVien.tenLot} ${ChiTietThanhVien.tenThanhVien}</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px" style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Địa Chỉ</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.soNha}"><p style="font-style: italic;color: red;">Chưa có</p></c:when>
						<c:otherwise>
							Số nhà ${ChiTietThanhVien.soNha}, đường ${ChiTietThanhVien.duong}, P.${ChiTietThanhVien.phuongXa}, Q.${ChiTietThanhVien.quanHuyen}, ${ChiTietThanhVien.thanhPho}
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Ngày Sinh</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.ngaySinh}"><p style="font-style: italic;color: red;">Chưa có</p></c:when>
						<c:otherwise>
							${ChiTietThanhVien.ngaySinh}
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Email</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.email}"><p style="font-style: italic;color: red;">Chưa có</p></c:when>
						<c:otherwise>
							${ChiTietThanhVien.email}
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">CMND</td>
				<td style="text-align: left;padding-left: 10px;">
					<c:choose>
						<c:when test="${empty ChiTietThanhVien.chungMinhNhanDan}"><p style="font-style: italic;color: red;">Chưa có</p></c:when>
						<c:otherwise>
							${ChiTietThanhVien.chungMinhNhanDan}
						</c:otherwise>
					</c:choose>
				</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Vai Trò</td>
				<td style="text-align: left;padding-left: 10px;">${ChiTietThanhVien.tenVaiTro}</td>
			</tr>
			<tr style="background-color: transparent;">
				<td height="30px"  style="width: 120px;text-align: right;padding-right: 5px;font-weight: bold;">Bộ Phận</td>
				<td style="text-align: left;padding-left: 10px;">${ChiTietThanhVien.tenKhoa}</td>
			</tr>
		</table>
	</c:if>

	<!-- S FOOT CONTENT -->
			<jsp:include page="../block/footer.jsp" />
	<!-- E FOOT CONTENT -->
</div>
</body>
</html>